Convert the three remaining Gradle-based example projects
(client-v2-apache-arrow, demo-service, demo-kotlin-service) to Maven so
every project under examples/ builds with a single, consistent toolchain.
- Add a standalone pom.xml to each project, mirroring the existing Maven
examples: the CI-rewritten <clickhouse-java.version> property and the
<clickhouse-packages.classifier>all</> shaded artifacts.
* client-v2-apache-arrow: plain Java 17, Arrow BOM, exec:java run (the
required --add-opens flags live in .mvn/jvm.config).
* demo-service: spring-boot-starter-parent 3.4.4 + repackage.
* demo-kotlin-service: kotlin-maven-plugin 2.0.20 + Ktor BOM 2.3.12,
maven-shade-plugin fat jar (Main-Class io.ktor.server.netty.EngineMain).
- Remove the Gradle wrapper, build scripts, gradle.properties, version
catalog and the gradle-wrapper .gitattributes; switch each .gitignore to
target/ and update the arrow/demo-service READMEs to mvn commands.
- Drop the now-dead gradlew branch from .github/workflows/build.yml and
build_examples.sh, and the gradle.properties rewrite from release.sh
(release.sh already rewrites the example poms' <clickhouse-java.version>).
- run_examples.yml has no Gradle references, so it needs no change.
Implements: #2915
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Description
Implements #2915.
Converts the three remaining Gradle-based example projects to Maven so that every project under
examples/builds with a single, consistent toolchain:examples/client-v2-apache-arrowexamples/demo-serviceexamples/demo-kotlin-serviceNo Maven wrapper is added (no binary jar committed), and all Gradle folders/files are removed.
Per-project Maven setup
Each new
pom.xmlmirrors the existing Maven examples (examples/jdbc,examples/client-v2): a standalone POM, the<clickhouse-java.version>property that CI/release tooling rewrites, and the<clickhouse-packages.classifier>all</>shaded artifacts.arrow-bom19.0.0;slf4j;client-v2:…:all. Runnable withmvn compile exec:java. Apache Arrow needs a few--add-opensat JVM start, so those flags live in.mvn/jvm.config(applied to the Maven JVM thatexec:javaruns in), replacing Gradle'sapplicationDefaultJvmArgs.spring-boot-starter-parent+spring-boot-maven-plugin:repackage; starters actuator/web/data-jpa, Lombok, micrometer-core,clickhouse-jdbc:…:all. Runnable withmvn spring-boot:run.kotlin-maven-plugin2.0.20 (jvmTarget 17); Ktor 2.3.12 viaktor-bom;logback-classic;client-v2:…:all. Runnable fat jar built bymaven-shade-plugin(Main-Class: io.ktor.server.netty.EngineMain), equivalent to the Ktor Gradle plugin'sbuildFatJar.Removed / updated
gradlew,gradlew.bat,settings.gradle.kts,build.gradle.kts,gradle.properties, thegradle/dir (wrapper jar/properties + arrow'slibs.versions.toml), and arrow's gradle-wrapper.gitattributes..gitignore(x3):.gradle/build/→target/(IDE ignores kept)../gradlew …→mvn …for arrow and demo-service.CI / tooling
.github/workflows/build.yml— the "Compile examples" step alreadysed-rewrites<clickhouse-java.version>in everyexamples/*/pom.xmland runsmvn clean compilefor each; I only removed the now-deadif [ -e $d/gradlew ]; … ./gradlew clean buildbranch. All three converted projects are now picked up by the existing Maven loop..github/workflows/run_examples.yml— contains no Gradle references (it only buildsexamples/jdbcvia Maven), so no change is required. I did not add run-jobs for the service examples: they need a live server/DB, and running long-lived Spring Boot/Ktor servers in CI is out of scope for this build-tooling change.build_examples.sh(local twin of the CI loop) — removed the same deadgradlewbranch.release.sh— removed thegradle.propertiesrewrite (those files are gone); line 18 already rewrites the example poms'<clickhouse-java.version>, so the converted projects stay covered by the existing release step.docs/client-v2-json-support.md— corrected a stale line that called the (Maven) json-processors examples "Gradle".changes_checklist.md
Build/tooling + CI change only — no library code, public API, config keys, defaults, serialization, or output format touched.
### Docs & Examplesentry under0.11.0-rc1(matching the precedent set for the Arrow example in 0.10.0-rc1).Test / verification
Built against a locally-installed snapshot (
mvn -DskipTests -Dmaven.javadoc.skip=true install), reproducing the CI examples gate:mvn clean compile— all three projects pass (matchesbuild.yml'smvn clean compile).demo-kotlin-servicemvn package→ shaded jar withMain-Class: io.ktor.server.netty.EngineMain.demo-servicemvn package→ Spring Boot jar withStart-Class: com.clickhouse.demo_service.DemoServiceApplication.examples/.Notes